package com.imti.mall.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imti.mall.model.pms.pojo.PmsProductFullReduction;
import org.apache.ibatis.annotations.*;

@Mapper
public interface ProductFullReductionMapper extends BaseMapper<PmsProductFullReduction> {

    @Select("select id,product_id,full_price,reduce_price from pms_product_full_reduction where product_id=#{productId}")
    @Results({
            @Result(property = "productId",column = "product_id"),
            @Result(property = "fullPrice",column = "full_price"),
            @Result(property = "reducePrice",column = "reduce_price")
    })
    PmsProductFullReduction productFullReduction(@Param("productId") Long productId);
}
